"""KG_manage URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.urls import path
from django.contrib import admin
from kg_code_manage import views

urlpatterns = [
    path('admin/', admin.site.urls),
    # 默认主页
    path('', views.index),
    # 主页
    path('index/', views.index, name='index'),
    # 知识构建
    path('model', views.model, name="model"),
    # 预留接口 - 知识构建 图谱预览
    path('map_preview', views.map_preview, name="map_preview"),
    # 知识构建 插入图谱
    path('insert_map', views.insert_map, name="insert_map"),
    # 业务模型构建
    path('knowledge', views.knowledge, name="knowledge"),
    # 业务模型构建 - 基础模型
    path('base_model', views.base_model, name="base_model"),
    # 业务模型构建 - 添加基础模型
    path('add_base_model', views.Add_base_model.as_view(), name="add_base_model"),
    # 业务模型构建 - 修改基础模型
    path('edit_base_model', views.Edit_base_model.as_view(), name="edit_base_model"),
    # 业务模型构建 - 删除基础模型
    path('delete_base_model/<int:id>/', views.delete_base_model, name="delete_base_model"),

    # 知识百科
    path('knowledge_wikipedia', views.knowledge_wikipedia, name="knowledge_wikipedia"),

    # 百科词条
    path('wikipedia_entry', views.wikipedia_entry, name="wikipedia_entry"),
    # 百科词条 - 搜索
    path('search_wikipedia_entry', views.search_wikipedia_entry, name="search_wikipedia_entry"),
    # 百科词条 - 添加
    path('add_wikipedia_entry', views.Add_wikipedia_entry.as_view(), name="add_wikipedia_entry"),
    # 百科词条 - 编辑
    path('edit_wikipedia_entry/<int:id>/', views.Edit_wikipedia_entry.as_view(), name="edit_wikipedia_entry"),
    # 百科词条 - 删除
    path('delete_wikipedia_entry/<int:id>/', views.delete_wikipedia_entry, name="delete_wikipedia_entry"),

    # 百科分类展示
    path('wikipedia_classification', views.wikipedia_classification, name="wikipedia_classification"),
    # 百科分类搜索
    path('search_wikipedia_classification', views.search_wikipedia_classification, name="search_wikipedia_classification"),

    # 百科模板 - 展示
    path('wikipedia_template', views.Wikipedia_template.as_view(), name="wikipedia_template"),
    # 百科模板 - 搜索
    path('search_wikipedia', views.search_wikipedia, name="search_wikipedia"),
    # 百科模板 - 编辑
    path('edit_wikipedia_template/<int:id>/', views.Edit_wikipedia.as_view(), name="edit_wikipedia_template"),
    # 百科模板 - 添加
    path('add_wikipedia_template', views.Add_wikipedia.as_view(), name="add_wikipedia_template"),
    # 百科模板 - 删除
    path('delete_wikipedia/<int:n>/', views.delete_wikipedia, name="delete_wikipedia"),
    # 百科模板 - 预览
    path('preview_wikipedia/<int:n>/', views.preview_wikipedia, name="preview_wikipedia"),

    # 需求百科 - 展示
    path('require_wikipedia', views.Require_wikipedia.as_view(), name="require_wikipedia"),
    # 需求百科 - 添加
    path('add_require_wikipedia', views.add_require_wikipedia, name="add_require_wikipedia"),
    # 需求百科 - 预览
    path('preview_require_wikipedia/<int:id>/', views.preview_require_wikipedia, name="preview_require_wikipedia"),
    # 需求百科 - 编辑
    path('edit_require_wikipedia/<int:id>/', views.edit_require_wikipedia, name="edit_require_wikipedia"),
    # 需求百科 - 删除
    path('delete_require_wikipedia/<int:id>/', views.delete_require_wikipedia, name="delete_require_wikipedia"),
    # 需求百科 - 搜索
    path('search_require_wikipedia', views.search_require_wikipedia, name="search_require_wikipedia"),
    # 新增百科搜索url author:lee
    path('knowledge_search',views.Knowledge_search.as_view(),name='knowledge_search'),

    # 知识模板卡片
    path('card_template', views.card_template, name="card_template"),
    # 知识模板卡片 - 添加
    path('add_card_template', views.Add_card_template.as_view(), name="add_card_template"),
    # 知识模板卡片 - 编辑
    path('edit_card_template/<int:id>/', views.Edit_card_template.as_view(), name="edit_card_template"),
    # 知识模板卡片 - 删除
    path('delete_card_template/<int:id>/', views.delete_card_template, name="delete_card_template"),

    # 知识卡片
    path('knowledge_card', views.knowledge_card, name="knowledge_card"),
    # 知识卡片 - 添加
    path('add_knowledge_card', views.Add_knowledge_card.as_view(), name="add_knowledge_card"),
    # 知识卡片 - 编辑
    path('edit_knowledge_card/<int:id>/', views.Edit_knowledge_card.as_view(), name="edit_knowledge_card"),
    # 知识卡片 - 删除
    path('delete_knowledge_card/<int:id>/', views.delete_knowledge_card, name="delete_knowledge_card"),
    # 知识卡片 - 预览
    path('preview_knowledge_card/<int:id>/', views.preview_knowledge_card, name="preview_knowledge_card"),

    # 知识图谱服务接口
    path('service_interface', views.service_interface, name="service_interface"),

    # 本体页面服务接口
    path('noumenon', views.noumenon, name="noumenon"),
    # 本体全部查询接口
    path('noumenon_load', views.noumenon_load, name="noumenon_load"),
    # 请求创建本体服务窗口接口
    path('noumenon_create', views.noumenon_create, name="noumenon_create"),
    # 提交本体创建
    path('noumenon_add', views.noumenon_add, name="noumenon_add"),
    # 本体删除
    path('noumenon_delete', views.noumenon_delete, name="noumenon_delete"),
    # 本体更新请求页面
    path('noumenon_edit', views.noumenon_edit, name="noumenon_edit"),
    # 本体更新提交
    path('noumenon_edit_submit', views.noumenon_edit_submit, name="noumenon_edit_submit"),
    # 实体点查询 ###需要改接口名
    path('node_analysis', views.node_analysis, name="node_analysis"),
    # 图谱展示
    path('association_analysis', views.association_analysis, name="association_analysis"),
    # 地图展示
    path('map_analysis', views.map_analysis, name="map_analysis"),
    # 分析助手请求页面接口
    path('analysis_aide', views.analysis_aide, name="analysis_aide"),
    # 双击图谱node时
    path('node_side_nodes', views.node_side_nodes, name="node_side_nodes"),
    # 直方图分析接口
    path('histogram', views.histogram, name="histogram"),
    # 柱状图分析接口
    path('bar_chart', views.bar_chart, name="bar_chart"),
    # 时间线
    path('timeline', views.timeline, name="timeline"),
    # 历史分析接口
    path('history_load', views.history_load, name="history_load"),
    # 历史数据删除接口
    path('history_delete', views.history_delete, name="history_delete"),

    # 业务模型构建 - 基础模型展示
    path('data_mining_model', views.data_mining_model, name="data_mining_model"),

    # 业务模型构建 - 数据挖掘模型导入
    path('model_import', views.Model_import.as_view(), name="model_import"),
    # 业务构建模型 - 数据挖掘模型运行
    path('model_run/', views.Model_run.as_view(), name="model_run"),
    # 业务模型构建 - 数据挖掘模型修改
    path('model_edit', views.Model_edit.as_view(), name="model_edit"),
    # 业务模型构建 - 数据挖掘模型配置修改
    path('model_configuration_edit', views.Model_configuration_edit.as_view(), name="model_configuration_edit"),
    # 业务模型构建 - 数据挖掘模型状态修改
    path('model_status_edit', views.model_status_edit, name="model_status_edit"),
    # 业务模型构建 - 数据挖掘模型删除
    path('model_delete', views.model_delete, name="model_delete"),

    # 业务模型构建 - 知识推理模型导入
    path('knowledge_reasoning_model_import', views.Knowledge_reasoning_model_import.as_view(), name="knowledge_reasoning_model_import"),
    # 业务构建模型 - 知识推理模型运行
    path('knowledge_reasoning_model_run', views.Knowledge_reasoning_model_run.as_view(), name="knowledge_reasoning_model_run"),
    # 业务模型构建 - 知识推理模型修改
    path('knowledge_reasoning_model_edit', views.Knowledge_reasoning_model_edit.as_view(), name="knowledge_reasoning_model_edit"),
    # 业务模型构建 - 知识推理模型配置修改
    path('knowledge_reasoning_model_configuration_edit', views.Knowledge_reasoning_model_configuration_edit.as_view(), name="knowledge_reasoning_model_configuration_edit"),
    # 业务模型构建 - 知识推理模型状态修改
    path('knowledge_reasoning_model_status_edit', views.knowledge_reasoning_model_status_edit, name="knowledge_reasoning_model_status_edit"),
    # 业务模型构建 - 知识推理模型删除
    path('knowledge_reasoning_model_delete', views.knowledge_reasoning_model_delete, name="knowledge_reasoning_model_delete"),

    # 业务模型构建 - 关联分析模型导入
    path('correlation_analysis_model_import', views.Correlation_analysis_model_import.as_view(), name="correlation_analysis_model_import"),
    # 业务模型构建 - 关联分析模型运行
    path('correlation_analysis_model_run', views.Correlation_analysis_model_run.as_view(), name="correlation_analysis_model_run"),
    # 业务模型构建 - 关联分析模型修改
    path('correlation_analysis_model_edit', views.Correlation_analysis_model_edit.as_view(), name="correlation_analysis_model_edit"),
    # 业务模型构建 - 关联分析模型配置修改
    path('correlation_analysis_model_configuration_edit', views.Correlation_analysis_model_configuration_edit.as_view(), name="correlation_analysis_model_configuration_edit"),
    # 业务模型构建 - 关联分析模型状态修改
    path('correlation_analysis_model_status_edit', views.correlation_analysis_model_status_edit, name="correlation_analysis_model_status_edit"),
    # 业务模型构建 - 关联分析模型删除
    path('correlation_analysis_model_delete', views.correlation_analysis_model_delete, name="correlation_analysis_model_delete"),

	# 实体表节点展示
    path('nodes_load', views.nodes_load, name="nodes_load"),
    # 请求添加实体节点页面
    path('node_create', views.node_create, name="node_create"),
    # 实体添加
    path('node_add', views.node_add, name="node_add"),
    # 请求更新实体节点页面
    path('node_edit', views.node_edit, name="node_edit"),
    # 更新节点提交
    path('node_edit_submit', views.node_edit_submit, name="node_edit_submit"),
    # 实体节点删除
    path('node_delete', views.node_delete, name="node_delete"),
    # 实体边查询
    path('edge_load', views.edge_load, name="edge_load"),
    # 请求添加实体节点页面
    path('edge_create', views.edge_create, name="edge_create"),
    # 实体添加
    path('edge_add', views.edge_add, name="edge_add"),
    # 请求编辑实体节点页面
    path('edge_edit', views.edge_edit, name="edge_edit"),
    # 实体关系编辑
    path('edge_edit_submit', views.edge_edit_submit, name="edge_edit_submit"),
    # 实体关系删除
    path('edge_delete', views.edge_delete, name="edge_delete"),

    path('bar', views.bar, name="bar"),

    #知识图谱管理接口
    path('api_manager', views.api_manager, name="api_manager"),
    #数据获取
    path('api_load', views.api_load, name="api_load"),
    #创建接口界面
    path('api_create',views.api_create,name="api_create"),
    #创建接口
    path('api_add',views.api_add,name="api_add"),
    #编辑接口
    path('api_edit',views.api_edit,name="api_edit"),
    #删除接口
    path('api_del',views.api_del,name="api_del"),
    #运行跳转
    path('api_run',views.api_run,name='api_run'),


    #接收文件
    path('up_node_file',views.up_node_file,name='up_node_file'),
    path('up_edge_file',views.up_edge_file,name='up_edge_file')


]
